﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using ToyStore.Domain.System;

namespace ToyStore.Domain.Store
{
	/// <summary>
	/// Opinia do produktu.
	/// </summary>
	public class Opinion : BaseEntity
	{
		/// <summary>
		/// Autor opini,
		/// </summary>
		[DisplayName("Autor")]
		public virtual User User { get; set; }

		/// <summary>
		/// Treść opinii.
		/// </summary>
		[DisplayName("Opinia"), StringLength(4000)]
		public virtual string Text { get; set; }

		/// <summary>
		/// Produkt, którego dotyczy opinia.
		/// </summary>
		[DisplayName("Produkt")]
		public virtual Product Product { get; set; }

		/// <summary>
		/// Ocena produktu.
		/// </summary>
		[DisplayName("Ocena")]
		public virtual decimal Rating { get; set; }
	}
}
